const int analogOutPin=6;//LED light control
unsigned char ledLight=0;
int a = 1;

void setup(){
  pinMode(analogOutPin,OUTPUT);  
}

void loop(){
  
  ledLight+=a;
  if (ledLight == 0 || ledLight == 255)
  {
       a = -a;
  } 
   ledLight%=256;
  analogWrite(analogOutPin,ledLight);
}

